Skip to content

feat(tunnel,collaboration): 修复云中继 TLS 443 握手与租约去重,优化协作空间长对话分页与渲染 - #102

Merged
DimoADE merged 1 commit into
DimoADE:masterfrom
DorJay007:feat/tunnel-tls-and-collab-long-chat
Nov 19, 2026
Merged

DimoADE merged 1 commit into
DimoADE:masterfrom
DorJay007:feat/tunnel-tls-and-collab-long-chat

Conversation

@DorJay007

Copy link
Copy Markdown
Contributor

Summary

Fixes Desktop Cloud Relay connectivity over HTTPS (port == 443 TLS upgrade + lease renewal deduplication) and adds end-to-end backward pagination & rendering optimizations for long Collaboration Space threads (group spaces and direct:<id> DMs).

Desktop Host & Workbench
├── src-tauri/src/commands/host_tunnel.rs & host_tunnel_relay.rs
│     # Real tokio-rustls TLS on port 443 (GET /v1/tunnel -> 101; fixes 308 Redirect on plaintext 80)
│     # Backward-compatible mux (MuxOpen/MuxData/MuxClose) + legacy OpenData/ReplenishPool
│     # 65s local HTTP proxy timeout, QUICK_TUNNEL/RELAY mutual exclusion, legacy domain migration
├── frontend/src/features/model-router/accountHostConfigs.ts
│     # Skip redundant issueRelayLease calls while >15m remain; preserve lease on transient errors
├── crates/conversations/ & crates/server/src/host/collaboration.rs
│     # list_space_messages_window & list_dm_messages_window:
│     #   beforeSeq backward pagination + gap-safe latest tail window + hasMoreBefore / oldestSeq
└── frontend/src/features/collaboration/
      # CollaborationSpaceRuntime & MessageStream:
      #   beforeSeq server pagination with scrollHeight-delta anchor lock + incremental DM tail merge
      #   SpaceMessageRow React.memo prop stabilization (cards / reactions)
      # SpaceMessageBody:
      #   Single shared module-level ResizeObserver + WeakMap, line-count badge, collapse scroll anchor

Evidence

  • Before:
    • connect_to_relay_host connected plaintext TCP port 80 even when relay_port == 443, failing with Nginx 308 Permanent Redirect against HTTPS-enforced relay endpoints (https://dimo-ai.com); window focus syncs re-issued relay leases repeatedly.
    • space.listMessages used max_seq - limit arithmetic without beforeSeq support (capping threads at 200 messages), DM incremental syncs re-read 200 turns per delta, and each bubble instantiated its own ResizeObserver.
  • After:
    • cargo test -p dimo --lib commands::host_tunnel: 12/12 passed (http_tunnel_upgrade_consumes_exact_headers_and_rejects_308, mux_local_bridge_pumps_32k_chunks_and_emits_close_on_eof, official_quick_tunnel_requires_valid_account_lease_and_migrates_legacy_domain).
    • cargo test -p conversations --lib collaboration_sidebar: 6/6 passed (space_and_dm_windows_paginate_backward_with_has_more_before).
    • pnpm --filter ./frontend test (CollaborationSpacePage.test.tsx, SpaceMessageBody.test.tsx, threadApi.test.ts, accountHostConfigs.test.ts, HostTunnelPanel.test.tsx), tsc --noEmit, eslint --max-warnings 0, pnpm run arch:check, and cargo clippy -- -D warnings all pass with 0 warnings/violations.

Merge Danger

Door: Two-way

space.listMessages response fields (hasMoreBefore, oldestSeq) and request parameter (beforeSeq) are additive and backward-compatible; relay tunnel supports both mux and legacy OpenData/ReplenishPool servers.

Blast Radius: Low

Scoped to Desktop host_tunnel, relay lease sync in accountHostConfigs, and Collaboration Space message windowing/rendering (crates/conversations, crates/server/src/host/collaboration.rs, frontend/src/features/collaboration).

…e lease renewal, and paginate long collaboration chats
@DimoADE
DimoADE merged commit 0244007 into DimoADE:master Nov 19, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants